<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns:jsf="http://xmlns.jcp.org/jsf"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html">   
        <fieldset>
            <script jsf:name="/js/jquery-1.10.2.min.js" type="text/javascript"></script>            
            <script jsf:name="/js/jquery-picklist.min.js" type="text/javascript"></script>
            <script jsf:name="/js/user.js" type="text/javascript"></script>
            <legend>Cadastro de usuário</legend>
            <div class="messagesContainer"><h:messages warnClass="warnMessages" class="messages"/></div>
            <f:view>
                <h:form prependId="false">
                    <label jsf:for="name">Nome:</label>
                    <br/>
                    <input type="text" size="60" required="true" jsf:id="name" 
                        jsf:value="${userManagedBean.user.name}"/>            
                    <br/>
                    <label jsf:for="login">Login:</label>
                    <br/>
                    <input type="text" size="60" required="true" jsf:id="loginName"
                           jsf:value="${userManagedBean.user.loginName}"/>
                    <br/>
                    <label jsf:for="passwordUser">Senha:</label>
                    <br/>
                    <input type="password" size="60" required="true" jsf:id="passwordUser" 
                        jsf:value="${userManagedBean.user.password}"/>                    
                    <br/>
                    <label jsf:for="repeatPassword">Repetir Senha:</label>
                    <br/>
                    <input type="password" size="60" required="true" jsf:id="repeatPassword" 
                           oninput="check(this)"/>                    
                    <br/>                   
                    <input type="submit" value="Salvar" jsf:action="${userManagedBean.register}" class="button"/>                                                            
                    <input type="button" value="Cancelar" jsf:actionListener="${userManagedBean.cancel}" class="button"/>                                                            
                </h:form>
            </f:view>
        </fieldset>        
</html>

